package com.stedu.service.Impl;

import com.stedu.bean.Admin;
import com.stedu.mapper.AdminMapper;
import com.stedu.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
@Service
public class AdminServiceImpl implements AdminService {
    @Autowired
    private AdminMapper adminMapper;



    @Override
    public Admin login(String username, String password) {
        return adminMapper.selectByUsernameAndPassword(username, password);
    }

    @Override
    public List<Map<String, Object>> findPlaAndGames()  {
        return adminMapper.selectPlaAndGamas();
    }

    @Override
    public String fingPasswordByUsername(String username, String password)  {
        return adminMapper.selectPasswordByUsername(username, password);
    }

    @Override
    public boolean uppassword(String username, String password)  {
        return adminMapper.updatepassword(username, password)==1?true:false;
    }
}
